<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      img {
        width: 120px;
        height: 120px;
      }
    </style>
    <script src="./js/jquery-3.6.0.js"></script>
  </head>
  <body>
    <img src="./images/1.jpg" alt="" />
    <hr>
    <button>显示</button>
    <button>隐藏</button>
    <button>切换</button>
  </body>
</html>
<script>
  $("button:eq(0)").click(function(){
    $("img:hidden").show(5000)
    console.log("=====显示======")
  })

  $("button:eq(1)").click(function(){
    $("img:visible").hide(3000)
    console.log("====隐藏=======")
  })

  $("button:eq(2)").click(function(){
    $("img").toggle(1000)
    console.log("====切换=======")
  })
</script>
